package org.easymis.crm.modules.system.controller;

import org.easymis.commons.web.BaseController;
import org.easymis.commons.web.utils.Page;
import org.easymis.commons.web.utils.R;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "用户管理|员工管理")
@Controller
public class HrmStaffInfoController extends BaseController {
	@ApiOperation(value = "用户管理首页", notes = "html", produces = MediaType.APPLICATION_JSON_VALUE)
	@RequestMapping(value = { "/system/staffInfo/index.html" }, method = { RequestMethod.GET, RequestMethod.POST })
	public String index(@ModelAttribute Page page, ModelMap map) throws Exception {
		return getTplPath(map, "system/staffInfo/index");
	}

	@ApiOperation(value = "用户分页列表", notes = "html", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/list.html" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R list(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
	@ApiOperation(value = "用户分页列表", notes = "JSON ", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/list.json" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R listJson(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
	@ApiOperation(value = "添加", notes = "html", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/add.html" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R forwardAdd(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
	@ApiOperation(value = "添加", notes = "JSON ", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/save.do" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R save(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
	@ApiOperation(value = "删除", notes = "JSON ", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/delete.do" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R delete(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
	@ApiOperation(value = "编辑", notes = "html", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/edit.html" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R forwardEdit(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
	@ApiOperation(value = "修改", notes = "JSON ", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/update.do" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R update(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
	@ApiOperation(value = "详情", notes = "JSON ", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/view.json" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R viewJson(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
	@ApiOperation(value = "详情", notes = "html", produces = MediaType.APPLICATION_JSON_VALUE)
	@ResponseBody
	@RequestMapping(value = { "/system/staffInfo/view.html" }, method = { RequestMethod.GET, RequestMethod.POST })
	public R view(@ModelAttribute Page page, ModelMap map) throws Exception {
		return new R().ok();
	}
}
